package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.service.BorrowService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 借阅查询
 */
@RestController
@RequestMapping("/borrow")
public class BorrowController {
    @Reference
    private BorrowService borrowService;
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        PageResult pageResult = borrowService.pageQuery(queryPageBean);
        return pageResult;
    }
    @RequestMapping("/findPage2")
    public PageResult findPage2(@RequestBody QueryPageBean queryPageBean){
        PageResult pageResult = borrowService.pageQuery2(queryPageBean);
        return pageResult;
    }

}
